<?php
/**
 * @see Alinks_Menu_Abstract
 */
require_once('Alinks/Menu/Abstract.php');

/**
 * @see Alinks_Ajax
 */
require_once('Alinks/Ajax.php');

/**
 * Displays the keyphrases menu
 *
 * Copyright (C) 2008  Sean Hickey
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @author Sean Hickey <sean@headzoo.com>
 * @version $Id: Keyphrases.php 382 2008-07-03 05:31:10Z sean $
 * @package Alinks_Menu
 */
class Alinks_Menu_Keyphrases extends Alinks_Menu_Abstract
{
	/**
	 * Adds any required CSS and JavaScript to the admin head
	 */
	public static function head()
	{
		parent::head();
		include('AlinksMenus/Keyphrases/Head.php');
	}

	/**
	 * Shows the keyphrases menu
	 */
	public static function show()
	{
		$factories = Alinks_Registry::get('Alinks_Factory_Keeper')->fetchAll();
		$factory_options = array();
		foreach($factories as $factory) {
			if (!$factory->hasKeyphrasesForm()) {
				continue;
			}
			$factory_options[$factory->getSafeName()] = $factory->getName();
		}
		include('AlinksMenus/Keyphrases.php');
	}
}